/* eslint-disable indent */
import service from '../util/service';

const link = (url: any, method = 'GET', data = {}, params = {}) => new Promise((resolve, reject) => {
    service.request({
        url,
        method,
        data,
        params,
    }).then((ok: any) => {
        resolve(ok);
    }).catch((err: any) => {
        reject(err);
    });
});
export default link;
